package com.lysj.bhp.manager.repository;


import com.lysj.bhp.manager.domain.Company;
import com.lysj.bhp.util.web.SelectItem;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface CompanyRepository extends JpaRepository<Company, Long>, JpaSpecificationExecutor {

    @Query("select new com.lysj.bhp.util.web.SelectItem(t.companyId AS value,t.name AS name) from Company t")
    List<SelectItem> selectItems();


}
